import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入数字：");
        int x = sc.nextInt();
        int tem = x;
        int num = 0;
        while (x != 0){
            int ge = x % 10;
            x = x / 10;
            num = num * 10 + ge;
        }
        if (tem == num) {
            System.out.println("该数字为回文数");
        }else {
            System.out.println("该数字不是回文数");
        }
    }
}
